setups (not multi-monitor!) are very rare nowadays. If you really
need multiple X screens, open them as separate displays.
+* The behavior of GtkBox::expand has been changed to never propagate
+ up. Previously, this was happening inconsistently. If you want the
+ expand to propagate, use the GtkWidget h/v expand properties.
+ If you experience sizing problems with widgets in ported code,
+ carefully check the expand and fill flags of your boxes.
+
+
Release notes for 3.8
=====================
static void gtk_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void gtk_box_compute_expand (GtkWidget *widget,
- gboolean *hexpand,
- gboolean *vexpand);
static void gtk_box_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction);
widget_class->get_preferred_height_for_width = gtk_box_get_preferred_height_for_width;
widget_class->get_preferred_height_and_baseline_for_width = gtk_box_get_preferred_height_and_baseline_for_width;
widget_class->get_preferred_width_for_height = gtk_box_get_preferred_width_for_height;
- widget_class->compute_expand = gtk_box_compute_expand;
widget_class->direction_changed = gtk_box_direction_changed;
container_class->add = gtk_box_add;
* Note that the #GtkWidget:halign, #GtkWidget:valign, #GtkWidget:hexpand
* and #GtkWidget:vexpand properties are the preferred way to influence
* child size allocation in containers.
+ *
+ * In contrast to #GtkWidget::hexpand, the expand child property does
+ * not cause the box to expand itself.
*/
gtk_container_class_install_child_property (container_class,
CHILD_PROP_EXPAND,
}
}
-static void
-gtk_box_compute_expand (GtkWidget *widget,
- gboolean *hexpand_p,
- gboolean *vexpand_p)
-{
- GtkBoxPrivate *private = GTK_BOX (widget)->priv;
- GList *children;
- GtkBoxChild *child;
- gboolean our_expand;
- gboolean opposite_expand;
- GtkOrientation opposite_orientation;
-
- opposite_orientation = OPPOSITE_ORIENTATION (private->orientation);
-
- our_expand = FALSE;
- opposite_expand = FALSE;
-
- for (children = private->children; children; children = children->next)
- {
- child = children->data;
-
- /* we don't recurse into children anymore as soon as we know
- * expand=TRUE in an orientation
- */
-
- if (child->expand || (!our_expand && gtk_widget_compute_expand (child->widget, private->orientation)))
- our_expand = TRUE;
-
- if (!opposite_expand && gtk_widget_compute_expand (child->widget, opposite_orientation))
- opposite_expand = TRUE;
-
- if (our_expand && opposite_expand)
- break;
- }
-
- if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
- {
- *hexpand_p = our_expand;
- *vexpand_p = opposite_expand;
- }
- else
- {
- *hexpand_p = opposite_expand;
- *vexpand_p = our_expand;
- }
-}
-
static GType
gtk_box_child_type (GtkContainer *container)
{